#ifndef _EEPROM_H_
#define _EEPROM_H_


#ifdef __cplusplus
 extern "C" {
#endif

#include "debug.h"
#include "FreeRTOS.h"
#include "task.h"

/**********************************************************************
*@Note:
AT24Cxx

READ EEPROM:Start + 0xA0 + 8bit Data Address + Start + 0xA1 + Read Data + Stop.
WRITE EERPOM:Start + 0xA0 + 8bit Data Address + Write Data + Stop.
*******************************************************************************/
/* EERPOM DATA ADDRESS Length Definition */
//#define Address_8bit     0
#define Address_16bit    1

/* EERPOM DATA ADDRESS Length Selection */
//#define Address_Lenth    Address_8bit
#define Address_Lenth   Address_16bit
#define SIZE             sizeof(TEXT_Buffer)

void AT24CXX_Init(void);
void AT24CXX_Read(u16 ReadAddr, u8 *pBuffer, u16 NumToRead);
void AT24CXX_Write(u16 WriteAddr, u8 *pBuffer, u16 NumToWrite);


#ifdef __cplusplus
}
#endif



#endif
